﻿using System.Collections.Generic;

namespace Be.Timvw.Framework.Domain.Specifications
{
    public abstract class CompositeSpecification<T> : ISpecification<T>
    {
        private readonly IEnumerable<ISpecification<T>> specifications;

        protected CompositeSpecification(IEnumerable<ISpecification<T>> specifications)
        {
            this.specifications = specifications;
        }

        protected IEnumerable<ISpecification<T>> Specifications
        {
            get { return this.specifications; }
        }

        #region ISpecification<T> Members

        public abstract bool IsSatisfiedBy(T item);

        #endregion
    }
}